
import Relay from "react-relay";
export default class ListProgressMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { listProgress }`;
    }

    getVariables() {
        return {
            argsInput: {
                enterpriseId: this.props.enterpriseId,
                styleNo: this.props.styleNo,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on listProgressPayload  {
            listProgress {
                errorCode
                value
                totalResult
                id
                productionProgressDetailModel{
                    timeList
                    mapList
                }
                productionProgressModels{
                    updateTimePack
                    orderId
                    updateTimeTailor
                    agreement
                    countCut
                    countTailor
                    countClear
                    updateTimeClear
                    workName
                    styleNo
                    updateTimeCut
                    groupIds
                    enterpriseId
                    countPack
                } 
            }
        }`;
    }


    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on listProgressPayload  {
                    listProgress {
                         errorCode
                        value
                        totalResult
                        id
                        productionProgressDetailModel{
                            timeList
                            mapList
                        }
                        productionProgressModels{
                            updateTimePack
                            orderId
                            updateTimeTailor
                            agreement
                            countCut
                            countTailor
                            countClear
                            updateTimeClear
                            workName
                            styleNo
                            updateTimeCut
                            groupIds
                            enterpriseId
                            countPack
                        }
                    }
                 }
            `]
        }];
    }

}
